package com.ruoyi.group.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.group.domain.RpQuestionClassification;
import com.ruoyi.group.service.QuestionCategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:黄志超
 * @Todo:问题分类
 * @DateTime:2022/3/11 16:16
 * @Component:蜗牛
 **/
@RestController("/issue")
@Api(value = "/issue" ,description = "用户查看问题,提交问提等等")
public class IssueController extends BaseController {
   @Autowired
   QuestionCategoryService questionCategoryService;
    @PostMapping("/calssify/{calssifynumber}")
    public AjaxResult ajaxResult(@PathVariable("calssifynumber")  Integer calssifynumber){

        return  AjaxResult.success();
    }

    @PostMapping("/calssify")
    public AjaxResult ajaxResult(){
        List<RpQuestionClassification>  rpQuestionClassification = questionCategoryService.find();
        if (rpQuestionClassification!=null){
            return AjaxResult.success(rpQuestionClassification);
        }
      return AjaxResult.error();
    }

    public TableDataInfo tableDataInfo(){
        return null;
    }
}
